﻿package Interface.StatisticsClassses
{		
	import Interface.AvatarLoader;
	
	import flash.display.MovieClip;
	import flash.display.Bitmap;
	
	public class StatisticsAvatar extends AvatarLoader
	{
		private var FNoAvatar:MovieClip;
		
		public function StatisticsAvatar():void
		{
			super();
			FNoAvatar = getChildByName('NoAvatar') as MovieClip;
			FPercentage = getChildByName('StatisticAvatarPercentage') as TextField;
		}
		
		override public function set Photo(APath:String):void
		{
			FNoAvatar.visible = (APath == '');				
			if(!FNoAvatar.visible)
			{
				super.Photo = APath;
			}
			else
			{
				if(FPhoto)
				{
					removeChild(FPhoto);
					FPhoto = null;
				}
			}
		}
	}	
}
